Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync desktop wallet translations with Crowdin #644

Merged
merged 1 commit into from
Jun 10, 2024
Merged

Sync desktop wallet translations with Crowdin #644

merged 1 commit into from
Jun 10, 2024

Conversation

nop33
Copy link
Member

@nop33 nop33 commented Jun 10, 2024

Closes #643

See #620 (comment) for details and resources.

Copy link

changeset-bot bot commented Jun 10, 2024

⚠️ No Changeset found

Latest commit: a24cc9c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment on lines +5 to +7
push:
paths: ['apps/desktop-wallet/locales/**']
branches: [next]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This action will run only if there are changes in the files in the defined paths when a push in the next branch happens, or when run manually (workflow_dispatch).

Comment on lines +9 to +11
permissions:
contents: write
pull-requests: write
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed so that the action can push to a branch and create PRs.

uses: crowdin/github-action@v2
with:
config: 'apps/desktop-wallet/crowdin.yml'
upload_sources: true
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will upload new translation strings added to the English JSON.

with:
config: 'apps/desktop-wallet/crowdin.yml'
upload_sources: true
upload_translations: true
Copy link
Member Author

@nop33 nop33 Jun 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will upload any translations that were added in the corresponding language JSON files. This is basically essential for the initialization of the languages. Any further updates on these files should happen on Crowdin directly (in principal). But nothing stops us accepting PRs from translators that update translation files directly instead of going through Crowdin (for example, you can already add the French translations, it'd be an overhead to have to go through Crowdin in each of your PRs).

Comment on lines +26 to +31
download_translations: true
localization_branch_name: l10n_crowdin_translations
create_pull_request: true
pull_request_title: 'New Crowdin translations'
pull_request_body: 'New translations from https://crowdin.com/project/alephium-desktop-wallet.'
pull_request_base_branch_name: 'next'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this config easily reads, if there are any new translations added in Crowdin, they will be downloaded and a new PR will be created with the changes.

Comment on lines +2 to +3
CROWDIN_PROJECT_ID=
CROWDIN_PERSONAL_TOKEN=
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These 2 secrets were added in our GitHub actions settings in the frontend repo.

Copy link
Member

@mvaivre mvaivre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try it!

@nop33 nop33 merged commit 7b468a0 into next Jun 10, 2024
5 checks passed
@nop33 nop33 deleted the crowdin branch October 7, 2024 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate continuous localization software to desktop wallet
2 participants